<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="database.DAO, golf.Guild"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>길드 가입</title>
</head>
<body>
<%
	DAO dao = DAO.getInstance();
	int serverNo = (Integer)session.getAttribute("serverNo");
	Guild[] guilds = dao.getGuildListInServer(serverNo); //현재 서버의 길드목록 가져옴
%>
	<form name="form1" method="post" action="../post/postJoinGuild.jsp">
		 <table border="1" cellspacing="0" bordercolordark="white" bordercolorlight="black" width="80%">
	        <tr>
	            <td width="150"><span style="font-size:9pt;">길드명</span></td>
	            <td width="100"><span style="font-size:9pt;">길드원수/최대수</span></td>
	            <td width="100"><span style="font-size:9pt;">길드포인트/다음등급</span></td>
	            <td width="50"><span style="font-size:9pt;">길드등급</span></td>
	            <td width="50"><span style="font-size:9pt;">혜택경험치(배율)</span></td>
	            <td width="30"><span style="font-size:9pt;">선택</span></td>
	        </tr>
		<%for( int i = 0; i < guilds.length; i++){ %>
	        <tr>
	            <td width="150"><span style="font-size:9pt;"><%=guilds[i].getName() %></span></td>
	            <td width="100"><span style="font-size:9pt;"><%=guilds[i].getMember_cnt() %>/<%=guilds[i].getGrade().getLimit_member_cnt() %></span></td>
	            <td width="100"><span style="font-size:9pt;"><%=guilds[i].getPoint() %>/<%=guilds[i].getGrade().getLimit_point() %></span></td>
	            <td width="50"><span style="font-size:9pt;"><%=guilds[i].getGrade().getName() %></span></td>
	            <td width="50"><span style="font-size:9pt;"><%=guilds[i].getGrade().getBenefit_exp() %></span></td>
	            <td width="30"><span style="font-size:9pt;"><input type="radio" name="guildNo" id="1" value="<%=guilds[i].getNo() %>"></span></td>
	        </tr>
		<%} %>
	    </table>
	    <input type="submit" name="action" value="join">
    </form>
</body>
</html>